// pages/event/event.js
Page({
  data: {
    className: 'box',
    obj: {
      a: 1,
      b: 2
    }
  },

  addClass() {
    this.setData({
      className: 'box box-hidden'
    })
  },

  onEnd() {
    console.log('过渡动画执行完毕')
    this.setData({
      className: 'box'
    })
  },

  fn1() {
    console.log('fn1')
  },

  fn2(event) {
    // console.log(event)

    wx.request({
      url: 'http://localhost:3000',
    })
  }
})